package com.ruoyi.pims.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pims.mapper.RyStockOverviewMapper;
import com.ruoyi.pims.domain.RyStockOverview;
import com.ruoyi.pims.service.IRyStockOverviewService;
import com.ruoyi.common.core.text.Convert;

/**
 * 库存概览Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-18
 */
@Service
public class RyStockOverviewServiceImpl implements IRyStockOverviewService 
{
    @Autowired
    private RyStockOverviewMapper ryStockOverviewMapper;

    /**
     * 查询库存概览
     * 
     * @param overviewId 库存概览主键
     * @return 库存概览
     */
    @Override
    public RyStockOverview selectRyStockOverviewByOverviewId(Long overviewId)
    {
        return ryStockOverviewMapper.selectRyStockOverviewByOverviewId(overviewId);
    }

    /**
     * 查询库存概览列表
     * 
     * @param ryStockOverview 库存概览
     * @return 库存概览
     */
    @Override
    public List<RyStockOverview> selectRyStockOverviewList(RyStockOverview ryStockOverview)
    {
        return ryStockOverviewMapper.selectRyStockOverviewList(ryStockOverview);
    }

    /**
     * 新增库存概览
     * 
     * @param ryStockOverview 库存概览
     * @return 结果
     */
    @Override
    public int insertRyStockOverview(RyStockOverview ryStockOverview)
    {
        return ryStockOverviewMapper.insertRyStockOverview(ryStockOverview);
    }

    /**
     * 修改库存概览
     * 
     * @param ryStockOverview 库存概览
     * @return 结果
     */
    @Override
    public int updateRyStockOverview(RyStockOverview ryStockOverview)
    {
        return ryStockOverviewMapper.updateRyStockOverview(ryStockOverview);
    }

    /**
     * 批量删除库存概览
     * 
     * @param overviewIds 需要删除的库存概览主键
     * @return 结果
     */
    @Override
    public int deleteRyStockOverviewByOverviewIds(String overviewIds)
    {
        return ryStockOverviewMapper.deleteRyStockOverviewByOverviewIds(Convert.toStrArray(overviewIds));
    }

    /**
     * 删除库存概览信息
     * 
     * @param overviewId 库存概览主键
     * @return 结果
     */
    @Override
    public int deleteRyStockOverviewByOverviewId(Long overviewId)
    {
        return ryStockOverviewMapper.deleteRyStockOverviewByOverviewId(overviewId);
    }
}
